package weaver.formmode.interfaces.impl;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import weaver.conn.RecordSet;
import weaver.formmode.interfaces.PopedomCommonAction;

/**
 * @author	Huangwm
 * @date  	2019年12月16日 上午9:29:04
 * @project	E9_Project
 * @name	ProjectCustomBtnShow
 * @package weaver.formmode.interfaces.impl
 * @description	
 */
public class ProjectCustomBtnShow implements PopedomCommonAction{
	public static Log log = LogFactory.getLog(ProjectCustomBtnShow.class);
	/**
     * 拱北海关巡察模块项目查询页更多按钮操作类
     * 得到是否显示操作项
     * @param modeid 模块id
     * @param customid 查询列表id
     * @param uid 当前用户id
     * @param billid 表单数据id
     * @param buttonname 按钮名称
     * @retrun "true"或者"false"true显示/false不显示
     */
    @Override
    public String getIsDisplayOperation(String modeid, String customid,String uid, String billid, String buttonname) {
        RecordSet rs = new RecordSet();
        String sql = "select * from uf_InspectionPro where id=?";
        rs.executeQuery(sql,billid);
        if (rs.next()) {
            String modedatacreater = rs.getString("modedatacreater");
            log.info("当前模块id="+modeid+" 当前查询页id="+customid+" 当前数据id="+billid+" 当前按钮名称+"+buttonname+" 当前用户="+uid+" 数据创建人="+modedatacreater);
            if(modedatacreater.equals(uid)){
                return "true";
            }else{
                return "false";
            }
        }else{
        	return "false";
		}
    }
}
